home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Business Assistant
/
Business Assistant.iso
/
acctg
/
db3plsar
/
credit.prg
< prev
next >
Wrap
Text File
|
1986-08-04
|
3KB
|
129 lines
********************** ENTER CREDIT MEMOS.(CREDIT.PRG)
CLEAR
SET CONFIRM ON
SET EXACT ON
STORE ' ' TO Z
DO WHILE .T.
@ 2,0 CLEAR
@ 3,25 SAY 'Do you want to enter a credit? '
?
?
STORE ' ' TO PERMIT
WAIT ' ? 'TO PERMIT
IF PERMIT<>'Y'
RETURN
ENDIF
STORE 0.00 TO MUCR,MCR
USE INV
@ 2,0 CLEAR
@ 3,15 SAY 'Do you want to apply to a particular invoice? '
?
?
STORE ' ' TO ANSWER
WAIT ' ? 'TO ANSWER
IF ANSWER='Y'
@ 2,0 CLEAR
ACCEPT " Enter invoice number to apply credit to " TO X
@ 2,0 CLEAR
@ 23,28 SAY 'Just a minute'
LOCATE FOR INVNO=X
STORE ' ' TO ZACT
STORE ACCT TO ZACT
? ZACT
IF EOF()
@ 2,0 CLEAR
? CHR(7)
@ 6,20 SAY "I can't find an invoice # &X... "
STORE 1 TO XX
DO WHILE XX<70
STORE XX+1 TO XX
ENDDO WHILE XX<70
@ 2,0 CLEAR
LOOP
ENDIF EOF()
SET CONFIRM ON
IF NET=0.00
?
? CHR(7)
?
CLEA
@ 1,15 SAY 'PAID!-------*-------PAID!----ENTER FULL AMT OF ì
INVOICE AGAIN'
ENDIF
@ 2,0 CLEAR
@ 4,15 SAY '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
@ 6,25 SAY 'Account number:'
@ 6,44 SAY ACCT
@ 7,25 SAY 'Date of invoice:'
@ 7,41 SAY NEWDATE
@ 8,25 SAY 'Invoice #:'
@ 8,36 SAY INVNO
@ 9,25 SAY 'P.O.#:'
@ 9,35 SAY PONO
@ 10,25 SAY 'Amount:'
@ 10,38 SAY PRICE
@ 11,25 SAY 'Credits:'
@ 11,38 SAY CRINV
@ 12,25 SAY 'Payments:'
@ 12,38 SAY AMTAPPL
@ 13,25 SAY 'Net Due:'
@ 13,38 SAY NET
@ 15,15 SAY '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
@ 17,25 SAY 'Enter amount of credit' GET MCR
READ
SET CONFIRM OFF
REPLACE NET WITH PRICE - MCR
REPLACE CRINV WITH MCR
IF NET=0.00
REPLACE PAID WITH .T.
REPLACE PAYDATE WITH DATE()
ENDIF
SET TALK OFF
USE CUST
? MCR
LOCA FOR ACCT=ZACT
REPLACE NET WITH (NET-MCR)
? NET
LOOP
ENDIF ANSWER='Y'
IF ANSWER='N'
USE CUST
@ 2,0 CLEAR
?
?
?
?
ACCEPT ' This is an unapplied credit,please enter account number ì
' TO Z
LOCATE FOR ACCT=Z
IF BOF()
@ 2,0 CLEAR
@ 6,60 SAY CHR(7)
@ 6,20 SAY "I can't find an account for # &Z "
STORE 1 TO XX
DO WHILE XX<70
STORE XX+1 TO XX
ENDDO WHILE XX<70
LOOP
ENDIF BOF()
@ 2,0 CLEAR
@ 5,15 SAY '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
@ 7,15 SAY 'Account number:'
@ 7,31 SAY ACCT
@ 8,15 SAY NAME
@ 9,15 SAY ADDRESS
@ 10,15 SAY TRIM(CITY)+' '+TRIM(STATE)+' '+TRIM(ZIP)
@ 11,15 SAY 'Outstanding unapplied credits:'
@ 11,46 SAY UCREDIT
@ 13,15 SAY '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
@ 15,15 SAY 'Enter amount of unapplied credit' GET MUCR
READ
REPLACE UCREDIT WITH MUCR+UCREDIT
REPLACE NET WITH NET-MUCR
LOOP
ENDIF ANSWER='N'
ENDIF PERMIT='Y'
SET EXACT OFF
ENDDO
RETURN